for i in range (3):
    username = input("请输入用户名：")
    password = input("请输入密码：")
    if username == 'kate' and password == '777777':
        print("登录成功！")
        break
else:
    print("3次用户名或者密码均有误！退出程序。")